package cn.xxxy.fourm.service;

import java.util.Collection;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;

import cn.xxxy.fourm.entity.User;
import cn.xxxy.fourm.model.Node;
import cn.xxxy.fourm.model.UserDto;
@Service
public interface UserService {
	List<UserDto> listPage(int page,int rows);
	void deleteByUid(int uid);
	void update(User user);
	User updateByUid(int uid);
	void addUser(User user);
	long count();
	List<User> findByEmail(String email);
	List<User> findByEmailOrPassWord(String email,String password);
	User findByEmailAndUserName(String email,String userName);
	Page<User> list(Pageable pageable);
	/*List<User> findByStartTimeBetween(String date1,String date2);
	List<User> findByAgeLessThan(int age);
	List<User> findByUserNameLike(String username);
	List<User> findByUserNameStartingWith(String xx);
	List<Object[]> getUserMessage();
	List<Object[]> listUserOrder();*/
	Collection<User> listUsers();
	User login(String uname,String upass);
	void updateEmailAndPhoneAndAddressAndSign(String email,String phone,String address,String sign,Integer uid);
	
}
